/*
* Copyright (C) 2008-2009 J-P Nurmi jpnurmi@gmail.com
*
* This library is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* This library is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
* License for more details.
*
* $Id: ircbuffer_p.h 581 2009-05-19 16:40:38Z jpnurmi $
*/

#ifndef IRC_BUFFER_P_H
#define IRC_BUFFER_P_H

#include <QString>

namespace Irc
{
    class BufferPrivate
    {
        Q_DECLARE_PUBLIC(Buffer)

    public:
        BufferPrivate();

        inline void _q_bytesWritten(qint64 bytes) { bytesWritten = bytes; }
        inline void prepare(const QByteArray& prefix, const QByteArray& command, int code)
        {
            this->prefix = prefix;
            this->command = command;
            this->code = code;
        }

        Buffer* q_ptr;
        Session* session;
        QByteArray name;
        QByteArray encoding;
        qint64 bytesWritten;

        QByteArray prefix;
        QByteArray command;
        int code;
    };
}

#endif // IRC_BUFFER_P_H
